Skip to content

Conversation

@damster101
Copy link

Probably not Windows-compatible for buildFFVSHIPcudaclang? Only tested on Linux.

Probably not Windows-compatible for buildFFVSHIPcudaclang? Only tested on Linux.
@Khaoklong51
Copy link
Contributor

Patch for lastest git. also include all option.

index 149e05f..8652faf 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,14 @@ PREFIX ?= /usr/local
 DESTDIR ?=
 
 HIPARCH := gfx1201,gfx1100,gfx1101,gfx1102,gfx1103,gfx1151,gfx1012,gfx1030,gfx1031,gfx1032,gfx906,gfx801,gfx802,gfx803
+CUDAARCH := sm_75,sm_80,sm_86,sm_87,sm_89,sm_90,sm_100,sm_103,sm_110,sm_120
 
 ifeq ($(OS),Windows_NT)
     dllend := .dll
 	exeend := .exe
     fpiccuda :=
     fpicamd :=
+	fpicclang :=
     plugin_install_path := $(APPDATA)\VapourSynth\plugins64
     exe_install_path := $(ProgramFiles)\FFVship.exe
     ffvshiplibheader := -I include -lz_imp -lz -lffms2
@@ -19,6 +21,7 @@ else
 	exeend :=
     fpiccuda := -Xcompiler -fPIC
     fpicamd := -fPIC
+	fpicclang := -fPIC
     plugin_install_path := $(DESTDIR)$(PREFIX)/lib/vapoursynth
 	lib_install_path := $(DESTDIR)$(PREFIX)/lib
     exe_install_path := $(DESTDIR)$(PREFIX)/bin
@@ -41,6 +44,12 @@ buildFFVSHIPall: src/FFVship.cpp .FORCE
 buildFFVSHIPcudaall: src/FFVship.cpp .FORCE
 	nvcc -x cu src/FFVship.cpp -std=c++17 $(ffvshipincludeheader) -I "$(current_dir)include" -arch=all $(subst -pthread,-Xcompiler="-pthread",$(ffvshiplibheader)) -o FFVship$(exeend)
 
+buildFFVSHIPcudaclang: src/FFVship.cpp .FORCE
+	clang++ -x cuda src/FFVship.cpp -std=c++17 --cuda-gpu-arch=native -O3 -fcuda-approx-transcendentals -L/usr/local/cuda/lib64 -lcudart $(ffvshipincludeheader) $(ffvshiplibheader) -o FFVship$(exeend)
+
+buildFFVSHIPcudaclangall: src/FFVship.cpp .FORCE
+	clang++ -x cuda src/FFVship.cpp -std=c++17 --cuda-gpu-arch=$(CUDAARCH) -O3 -fcuda-approx-transcendentals -L/usr/local/cuda/lib64 -lcudart $(ffvshipincludeheader) $(ffvshiplibheader) -o FFVship$(exeend)
+
 build: src/VshipLib.cpp .FORCE
 	hipcc src/VshipLib.cpp -std=c++17 -I "$(current_dir)include" --offload-arch=native -I "$(current_dir)include" -Wno-unused-result -Wno-ignored-attributes -shared $(fpicamd) -o "$(current_dir)vship$(dllend)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants